class Article < ApplicationRecord
    validates :title, presence: true, length: { minimum: 5 }
    belongs_to :user
    
    def summary_html
        Kramdown::Document.new(summary).to_html
    end
    
    def text_html
        Kramdown::Document.new(text).to_html
    end
end
